EnableMenu lets you enable and disable items in menus you've created using the NewMenu* XFCN. Examples:
EnableMenu myMenu, 1, FALSE
EnableMenu myMenu, 3, (the userLevel>2)
The first example will always disable the first menu item in the menu "myMenu". The second example will disable the third item in "myMenu" IF the userLevel is greater than 2.
Passing an item number of 0 (zero) will enable or disable the ENTIRE menu.
•••
All the credit, (even the descriptions above) go to the creator of this ingenious XCMD:
Nine to Five Software Company
P.O. Box 915
Greenwood, IN 46142
(317) 887-2154
& Michael Long
See also NewMenu*, CheckMenu*, DeleteMenu*, ChangeMenu*, and ShowMenu*
-- part contents for background part 10
----- text -----
Syntax:
EnableMenu <menuNumber>,
<itemNumber>,TRUE/FALSE
<menuNumber> is the id number of the menu returned by the call to newMenu.
<itemNumber> is this menu item
(counting from the top with the 0 being the item name.)
The third parameter passed will either enable or diable the item.